package com.nulldev.util.graphics.renderIt.api;

import java.util.Map;

import com.nulldev.util.data.Arrays.maps.FastMaps;

public interface renderItConstants {
	public static final int RIT_NOT_SUPPORTED = -2;
	public static final int RIT_NULL = -1;

	public static final int RIT_FALSE = 0;
	public static final int RIT_TRUE = 1;

	public static final int RIT_PRIMARY_DISPLAY = 0;

	public static final int RIT_VALUE_TYPE_X = 2;
	public static final int RIT_VALUE_TYPE_Y = 3;
	public static final int RIT_VALUE_TYPE_WIDTH = 4;
	public static final int RIT_VALUE_TYPE_HEIGHT = 5;
	public static final int RIT_VALUE_TYPE_COLOR_RGB = 6;
	public static final int RIT_VALUE_TYPE_COLOR_R = 7;
	public static final int RIT_VALUE_TYPE_COLOR_G = 8;
	public static final int RIT_VALUE_TYPE_COLOR_B = 9;
	public static final int RIT_VALUE_TYPE_COLOR_A = 10;
	public static final int RIT_VALUE_TYPE_AWT_FONT_METRICS = 11;
	public static final int RIT_VALUE_TYPE_STRING = 12;
	public static final int RIT_VALUE_TYPE_RENDER_METHOD_INT = 13;
	public static final int RIT_VALUE_TYPE_FONT_FORMAT = 14;
	public static final int RIT_VALUE_TYPE_VEC_2F = 15;
	public static final int RIT_VALUE_TYPE_VEC_3F = 16;

	public static final int RIT_RENDERER_NAME = 17;
	public static final int RIT_RENDERER_VENDOR = 18;
	public static final int RIT_RENDERER_VERSION = 19;

	public static final int RIT_VSYNC_DISABLED = 20;
	public static final int RIT_VSYNC_DOUBLE_BUFFERED = 21;
	public static final int RIT_VSYNC_TRIPLE_BUFFERED = 22;

	public static final int RIT_DIRECT_SCANOUT = 23;
	public static final int RIT_FIXED_TILE_COPY = 24;
	public static final int RIT_DYNAMIC_TILE_COPY = 25;
	public static final int RIT_LAYERED_TILING = 26;

	public static final int RIT_SINGLE_THREADED_TILING = 27;
	public static final int RIT_MULTI_THREADED_TILING = 28;

	public static final int RIT_DISABLE_RENDER_BLACKHOLE = 29;
	public static final int RIT_ENABLE_RENDER_BLACKHOLE = 30;

	public static final int RIT_DISABLE_DAMAGE = 31;
	public static final int RIT_ENABLE_DAMAGE = 32;

	public static final int RIT_SWING_PANEL_PAINT = 33;
	public static final int RIT_SWING_PANEL_REPAINT = 34;
	public static final int RIT_SWING_PANEL_REPAINT_WITHIN_SYNC = 35;
	public static final int RIT_SWING_PANEL_PAINT_ALL = 36;
	public static final int RIT_SWING_PANEL_UPDATE = 37;

	/* */

	public static final int RIT_GET_SCANOUT_METHOD = 39;
	public static final int RIT_FONT_FORMAT_OTF = 40;
	public static final int RIT_FONT_FORMAT_TTF = 41;
	public static final int RIT_FONT_FORMAT_BITMAP = 42;

	public static final int RIT_RENDERER_VIRTUAL_ENVIRONMENT = 49;

	/* */

	public static final int RIT_STRING_OPTION_CLIP = 50;
	public static final int RIT_STRING_OPTION_FORMAT = 51;
	public static final int RIT_STRING_OPTION_RTL = 52;
	public static final int RIT_STRING_OPTION_INVERT = 53;

	/* */

	public static final int GL_SYNC_IMPL_GENERIC = 60;
	public static final int GL_SYNC_IMPL_OML = 61;
	public static final int GL_SYNC_IMPL_MESA = 62;
	public static final int GL_SYNC_IMPL_SGI = 63;
	public static final int GL_SYNC_IMPL_INTEL = 64;
	public static final int GL_SYNC_IMPL_GLX = 65;

	/* */

	public static final int RIT_BACKEND_GET_CONTEXT_BEHAVIOUR = 70;
	public static final int RIT_BACKEND_BEHAVIOUR_SINGLE_CONTEXT = 71;
	public static final int RIT_BACKEND_BEHAVIOUR_MULTI_CONTEXT = 72;
	public static final int RIT_BACKEND_BEHAVIOUR_NO_CONTEXT = 73;

	public static final int RIT_BACKEND_GET_COMPAT_IMAGE_MODE = 74;
	public static final int RIT_BACKEND_GET_2D_PREFERRED_HINT = 75;
	public static final int RIT_BACKEND_GET_IDLE_RENDER_BEHAVIOUR = 76;
	public static final int RIT_BACKEND_BEHAVIOUR_SLOWDOWN = 77;
	public static final int RIT_BACKEND_BEHAVIOUR_NORMAL = 78;
	public static final int RIT_BACKEND_BEHAVIOUR_REDRAW_ON_DEMAND = 79;

	public static final int RIT_IO_TYPE_KEYBOARD = 80;
	public static final int RIT_IO_TYPE_MOUSE = 81;

	/* */

	public static final int RIT_BACKEND_GET_RENDERER_TYPE = 85;
	public static final int RIT_BACKEND_RENDERER_TYPE_SOFTWARE = 86;
	public static final int RIT_BACKEND_RENDERER_TYPE_HARDWARE = 87;
	public static final int RIT_BACKEND_RENDERER_TYPE_HYBRID = 88;

	public static final int RIT_BACKEND_GET_3D_PREFERRED_HINT = 89;
	public static final int RIT_BACKEND_GET_BUFFERING_BEHAVIOUR = 90;

	/* */

	public static final int RIT_VALUE_TYPE_VEC_4F = 95;
	public static final int RIT_VALUE_TYPE_GL_VECTOR_TYPE = 96;
	public static final int RIT_VALUE_TYPE_GL_DIRECTION_TYPE = 97;
	public static final int RIT_VALUE_TYPE_GL_VEC_RENDER_TYPE = 98;
	public static final int RIT_VALUE_TYPE_MAT_3F = 99;

	public static final int GL_VECTOR_TYPE_COORD_FLOAT = 100;
	public static final int GL_VECTOR_TYPE_COORD_INT = 101;
	public static final int GL_VECTOR_TYPE_COORD_DOUBLE = 102;
	public static final int GL_VECTOR_TYPE_COORD_SHORT = 103;
	public static final int GL_VECTOR_TYPE_COORD_LONG = 104;

	public static final int GL_DIRECTION_TYPE_SWING = 105;
	public static final int GL_DIRECTION_TYPE_INV_Y = 106;
	public static final int GL_DIRECTION_TYPE_INV_X = 107;
	public static final int GL_DIRECTION_TYPE_INV_XY = 108;
	public static final int GL_DIRECTION_TYPE_INV_YX = 109;

	public static final int GL_TYPE_POINTS = 110;
	public static final int GL_TYPE_LINES = 111;
	public static final int GL_TYPE_LINE_STRIP = 112;
	public static final int GL_TYPE_LINE_LOOP = 113;
	public static final int GL_TYPE_TRIANGLES = 114;
	public static final int GL_TYPE_TRIANGLE_STRIP = 115;
	public static final int GL_TYPE_TRIANGLE_FAN = 116;
	public static final int GL_TYPE_QUADS = 117;
	public static final int GL_TYPE_QUAD_STRIP = 118;
	public static final int GL_TYPE_POLYGON = 119;

	public static final int RIT_VALUE_TYPE_MAT_4F = 120;

	/* */

	public static final int RIT_BACKEND_GET_RENDER_DIRECTION = 130;
	public static final int RIT_BACKEND_RENDER_DIRECTION_TOP_LEFT = 131;
	public static final int RIT_BACKEND_RENDER_DIRECTION_BOTTOM_LEFT = 132;
	public static final int RIT_BACKEND_RENDER_DIRECTION_TOP_RIGHT = 133;
	public static final int RIT_BACKEND_RENDER_DIRECTION_BOTTOM_RIGHT = 133;
	// 134

	/* */

	public static final int RIT_PAINT_REQUEST_TYPE_STANDARD = 135;
	public static final int RIT_PAINT_REQUEST_TYPE_REPAINT_FULL = 136;
	public static final int RIT_PAINT_REQUEST_TYPE_REPAINT_SELECTIVE = 137;
	public static final int RIT_PAINT_REQUEST_TYPE_SUGGESTED_REPAINT_FULL = 138;
	public static final int RIT_PAINT_REQUEST_TYPE_SUGGESTED_REPAINT_SELECTIVE = 139;
	// 140

	/* */

	public static final int RIT_GET_TILE_COUNT = 150;

	public static final int RIT_VSYNC_ADAPTIVE = 151;
	public static final int RIT_VSYNC_ENABLED = 152;

	public static final int RIT_RENDERER_LONG_STRING = 160;

	/* LCDUI Constants */

	public static final int RIT_LCDUI_TRANS_NONE = 0;
	public static final int RIT_LCDUI_TRANS_MIRROR_ROT180 = 1;
	public static final int RIT_LCDUI_TRANS_MIRROR = 2;
	public static final int RIT_LCDUI_TRANS_ROT180 = 3;
	public static final int RIT_LCDUI_TRANS_MIRROR_ROT270 = 4;
	public static final int RIT_LCDUI_TRANS_ROT90 = 5;
	public static final int RIT_LCDUI_TRANS_ROT270 = 6;
	public static final int RIT_LCDUI_TRANS_MIRROR_ROT90 = 7;

	/* ///\\\///\\\///\\\ */

	final static Map<Object, String> strings = FastMaps.fixedUniMap(new Object[][]
		{
				{ -2, "RIT_NOT_SUPPORTED" },
				{ -1, "RIT_NULL" },

				{ 0, "RIT_FALSE" },
				{ 1, "RIT_TRUE" },

				{ 86, "RIT_BACKEND_RENDERER_TYPE_SOFTWARE" } });

	public static Object TO_STRING(final Object o) {
		return strings.getOrDefault(o, "UNKNOWN_VALUE (" + o + ")");
	}
}
